package com.zs.controller;

import com.zs.annotation.MyAutowired;
import com.zs.annotation.MyController;
import com.zs.annotation.MyRequestMapping;
import com.zs.annotation.MyRequestParam;
import com.zs.service.UserService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@MyRequestMapping("/user")
@MyController
public class UserController {
    @MyAutowired
    UserService userServiceImpl;

    @MyRequestMapping(value = "/test", method = "GET")
    public void getUser(HttpServletRequest httpRequest, HttpServletResponse httpResponse, @MyRequestParam(value = "name",required = true) String name) throws IOException {
        System.out.println(name);

        httpResponse.getWriter().write("success!");
    }

}
